{% extends "base.html" %}
{% block page_title %}任务列表{% endblock %}

{% block page_css %} <link href="{{ url_for('static',filename='css/list.css') }}" rel="stylesheet"> {% endblock %}

{% block page_content %}
<div class="row">
    <div class="col-md-10 col-md-offset-1 col-sm-12">
    <h2>任务列表</h2>
        <div class="list-group">
        <ul>
        {% for task in tasks %}
            <li class="list-group-item"><span class="glyphicon glyphicon-book"></span><a href="{{ url_for('main.taskDetail',id=task.id) }}">{{ task.task_name }}</a>
            {% if current_user.isAdmin() %}
            <a href="{{ url_for('main.deleteTask',id=task.id) }}"><button class="btn btn-info pull-right">删除</button></a>
            {% endif %}
            </li>
        {% endfor %}
        </ul>
        </div>
    </div>
</div>
{% endblock %}